package com.dubbo.api;

import com.dubbo.api.model.BrowserModel;
import com.dubbo.api.model.HotWordModel;
import com.dubbo.api.model.KeywordModel;
import com.dubbo.api.model.PaperHWordModel;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

public interface HotWordService {

    //原始词频统计
    KeywordModel countKW(String KWord);
    //用户浏览与论文绑定,
    void userReadPaper(BrowserModel browserModel);
    //更新热词表
    void Update(HotWordModel hotWordModel);
    //查询通过论文id
    PaperHWordModel selectByPid(Integer id);
    //插入PW
    void insertPW(PaperHWordModel paperHWordModel);
    //插入HW
    void insertHW(HotWordModel hotWordModel);
    //取出keyword 从 keyword表
    List<String> getKWord(Integer pId);
    //通过热词查询hw_id
    HotWordModel selectByHWord(String hWord);
    //更新词频
    void updateCurrent(HotWordModel hotWordModel);
    //热词排名算法准备
    List<HotWordModel> rankBefore() throws ParseException;
    //遍历
    List<HotWordModel>  listHW();
    //热词算法
    List<HotWordModel> sort(List<HotWordModel> hotWordModel);
}
